package com.lz.ub

import com.lz.ub.core.UBCScanResult

/**
 * @author You
 * USB Command线程切换器
 */
interface UBCExecute {

    //发送重启
    fun sendRestart()

    //发送OK
    fun sendOK()

    //发送连接上回调
    fun sendConnected(mac: String, id: Int)

    //连上时返回UUID的handle回调
    fun sendSuccess()

    //发送服务回调
    fun sendService()

    //发送断开回调
    fun sendDisconnected(mac: String)

    //发送写入
    fun sendWrite(size: Int)

    //发送接收
    fun sendReceived(id: Int, data: String)

    //发送接收16进制
    fun sendReceivedHex(id: Int, bytes: ByteArray, start: Int, size: Int)

    //发送扫描结果
    fun sendScan(result: UBCScanResult)

    //响应err
    fun sendError()
}